<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <script>
            //ES6 class   !! class基本语法
            //JavaScript语言的传统方法是通过构造函数，定义并生成新对象。下面是一个例子:
            // function Point(x, y) {
            //     this.x = x;
            //     this.y = y;
            // }
            // Point.prototype.toString = function () {
            //     return "(" + this.x + ", " + this.y + ")";
            // };
            // var p = new Point(1, 2);
            var vm = new Vue({
                data: {
                    obj: {
                        a: 1,
                    },
                },
                created: function () {
                    console.log(this.obj);
                },
            });
        </script>
    </body>
</html>
